_require "../../../../basis.smi"
_require local "../../../../smlnj-lib/Util/ord-key-sig.sml"
_require "../../../../smlnj-lib/Util/binary-set-fn.smi"
_require "../../../../smlnj-lib/Util/binary-map-fn.smi"
_require "../../../data/symbols/main/Symbol.smi"
_require local "../../../extensions/debug/main/Bug.smi"
_require "../../../libs/ids/main/LocalID.smi"

_require "./Types.ppg.smi"

structure TvOrd =
struct
  type ord_key = Types.tvState ref
  val compare : ord_key * ord_key -> order
end

structure TidOrd =
struct 
  type ord_key = FreeTypeVarID.id
  val compare : ord_key * ord_key -> order
end

structure TEnv = BinaryMapFn(TidOrd)
structure OTSet = BinarySetFn(TvOrd)

structure varInfoOrd =
struct
  type ord_key = {path:Symbol.longsymbol, id:VarID.id, ty:Types.ty, opaque:bool}
  val compare : ord_key * ord_key -> order
end

structure VarInfoEnv = BinaryMapFn(varInfoOrd)
structure VarInfoSet = BinarySetFn(varInfoOrd)
